<%@ page import="java.util.ArrayList" %>
<%@ page import="com.wmm.bean.Student" %><%--
  Created by IntelliJ IDEA.
  User: Sakura
  Date: 2020/9/23
  Time: 22:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Bootstrap -->
    <link href="./css/bootstrap.min.css" rel="stylesheet" media="screen">
    <!-- 这里需要引入相关的js，很重要，请记住 -->
    <script type="text/javascript" src="./js/jquery-3.4.1.min.js"></script>
    <script type="text/javascript" src="./js/bootstrap.min.js"></script>
    <script type="text/javascript" src="./js/job.js"></script>
    <title>JS框架学习</title>
</head>
<body onload="init()">
<div class="container">
    <table class="table" id="table">
        <caption>
            <button class="btn btn-info" id="user_add" data-toggle="modal" data-target="#myModal">新增</button>
            <button class="btn btn-info" id="user_delete">删除</button>
            <button class="btn btn-info" id="user_edit" data-toggle="modal" data-target="#myModal">编辑</button>
            <button class="btn btn-info" id="user_find">查询</button>
            <input type="text" id="s_code" placeholder="按工号查询" style="width: 130px;">
        </caption>
        <thead>
        <tr>
            <th>学号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>出生日期</th>
            <th>邮箱</th>
            <th>备注</th>
        </tr>
        </thead>
       <% ArrayList<Student> students = (ArrayList<Student>) session.getAttribute("students");
          for (Student st : students){
       %>
        <tr>
            <td><%= st%></td>
        </tr>
        <%}%>
    </table>
    <!-- 模态框（Modal） -->
    <div class="modal " id="myModal" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal" aria-hidden="true">
                        <span>&times;</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel">
                        新增用户
                    </h4>
                </div>
                <div class="modal-body" id="modal-body">
                    <label for="name">学号:</label>
                    <input type="text" class="form-control" id="m_code" placeholder="请输入学号">
                    <label for="name">姓名:</label>
                    <input type="text" class="form-control" id="m_userName" placeholder="请输入姓名">
                    <label for="name">性别:</label>
                    <input type="text" class="form-control" id="m_sex" placeholder="请输入性别">
                    <label for="name">出生日期:</label>
                    <input type="text" class="form-control" id="m_passWord" placeholder="请输入出生日期">
                    <label for="name">邮箱:</label>
                    <input type="text" class="form-control" id="m_age" placeholder="请输入邮箱">
                    <label for="name">备注:</label>
                    <input type="text" class="form-control" id="m_birthday" placeholder="请输入备注">
                </div>
                <div class="modal-footer">
                    <button id="save" class="btn btn-default" data-dismiss="modal">保存
                    </button>
                    <button type="button" class="btn btn-primary">提交更改</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
</div>
</body>

</html>
